* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: #fcfcfc;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

h1 {
  color: #333;
}

.messageContainer {
  display: flex;
  flex-direction: column;
  margin: 8px;
  overflow-y: auto;
  word-wrap: break-word;
  white-space: pre-wrap;
}

  .messageContainer::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

.fileBlock {
  width: 200px;
  height: 40px;
  margin: 5px;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: lightblue;
  color: blue;
  cursor: pointer;
  transition: background-color .2s;
}

.fileBlock:hover {
  background-color: rgb(144, 198, 215);
}

.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 1;
  /* Sit on top */
  left: 0;
  top: 0;
  width: 100vw;
  /* Full width */
  height: 100vh;
  /* Full height */
  overflow: auto;
  /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.5);
  /* Black with opacity */
}

.modal-content {
  position: relative;
  background-color: #fefefe;
  /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  /* Could be more or less, depending on screen size */
  max-height: 800px;
  /* Fixed height */
  max-width: 1000px;
  /* Fixed width */
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  /* Enable vertical scroll */
}

.draggable {
  cursor: move;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.userMessageContainer {
  align-items: flex-end;
}

.assistantMessageContainer,
.ToolMessageContainer {
  align-items: flex-start;
}

h1,
h2,
h3 {
  margin-block: 3px;
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 61.8%;
  border-radius: 8px;
  margin: 4px;
  padding: 8px;
}

.message ol,
ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-inline: 20px;
  margin-block: 10px;
}

.userMessageBlock {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.message p {
  margin: 4px;
}

.userMessage {
  background-color: #D1E3FF;
  font-size: larger;
  font-family: ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif;
  color: #333333;
  margin-right: 10px;
}

.assistantMessage {
  background-color: #EBECED;
  color: #333333;
  font-size: larger;
  font-family: ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif;
  margin-left: 10px;
}

.toolMessage {
  background-color: #E3D7F5;
  color: #333333;
  font-size: larger;
  font-family: ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif;
  margin-left: 10px;
  border: 2px solid #a8b9f1;
}

.author {
  padding: 5px 0;
}

.author.user {
  color: #aaaaaa;
  text-align: right;
  margin-right: 13px;
}

.author.assistant,
.author.tool {
  color: #aaaaaa;
  text-align: left;
  margin-left: 13px;
}

.code-header {
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgb(47, 47, 47);
  font-size: 12px;
  color: #fff;
  border-bottom: 1px solid #444;
}

.language {
  font-family: Arial, sans-serif;
}

.copy-button {
  background-color: inherit;
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}

code.hljs {
  background: none;
}

code {
  margin: 0;
  padding: 0;
  display: block;
  position: relative;
  top: -20px;
}

.code-mainArea {
  overflow-x: auto;
  padding: 14px 0px 0px 10px;
}
  .code-mainArea::-webkit-scrollbar {
    height: 8px;
  }

  .code-mainArea::-webkit-scrollbar-track {
    background: #000;
  }

  .code-mainArea::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 10px;
  }

.code-wrapper {
  background-color: #000;
  color: #fff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  white-space: pre;
  min-height: fit-content;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.latex-formula {
  color: #007bff;
  font-style: italic;
}


mjx-container {
  text-align: start !important;
  margin: 10px 0 10px 0 !important;
}

.edit-input {
  resize: none;
  outline: none;
  border: none;
  background-color: transparent;
  padding: 5px;
  resize: none;
  width: 300px;
  height: 100px;
}

.edit-icon {
  position: absolute;
  top: 50%;
  left: -30px;
  transform: translateY(-50%);
  cursor: pointer;
}

.edit-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.edit-buttons button {
  padding: 10px 20px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s, color 0.3s;
}

.cancel-button {
  background-color: black;
  color: white;
}

.cancel-button:hover {
  background-color: darkgray;
}

.send-button {
  background-color: white;
  color: black;
  border: 1px solid black;
}

.send-button:hover {
  background-color: lightgray;
}

span.hljs-keyword {
  color: #1f95d3
}

span.hljs-title {
  color: #e42c3d;
}

span.hljs-built_in {
  color: #e9950d;
}

span.hljs-string,
.hljs-subst {
  color: #026c2a;
}

span.hljs-comment {
  color: #807d6c;
}

.action-icons-container {
  display: flex;
  gap: 10px;
  position: relative;
  left: 20px;
  top: 13px;
  transform: translateY(-50%);
}

.copy-icon {
  cursor: pointer;
  font-size: 16px;
}

.resend-icon {
  cursor: pointer;
  font-size: 20px;
  margin-left: 7px;
  margin-top: 1px;
}

.left-branch {
  cursor: pointer;
  font-size: 16px;
  margin-right: 3px;
  margin-top: 1px;
}

.number-display {
  font-size: 16px;
  margin-right: 3px;
  margin-top: 1px;
}

.right-branch {
  cursor: pointer;
  font-size: 16px;
  margin-right: 40px;
  margin-top: 1px;
}

.message-preview {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.message-full {
  display: none;
  width: 100%;
}

.toggle-button {
  display: inline-block;
  padding: 5px 10px;
  margin: 5px 0;
  font-size: 12px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  width: 80px;
}

  .toggle-button:hover {
    background-color: #e0e0e0;
  }

  .toggle-button:focus {
    outline: none;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  }
